﻿function HoverLi(dotId,tabName,openNum){
	var dots_=document.getElementById(dotId).getElementsByTagName(tabName);
	for(i=0;i<dots_.length;i++){
		dots_[i].num=i;
		dots_[i].onclick=function(){
			for(j=0;j<dots_.length;j++)
				dots_[j].parentNode.className="";
			dots_[this.num].parentNode.className="selected";
		}
	}
	dots_[openNum].parentNode.className="selected";
}

function daohang(s,openNum){
	var links=document.getElementById(s).getElementsByTagName("a");
	for(i=0;i<links.length;i++)
		links[i].onclick=function(){
			for(j=0;j<links.length;j++)
				links[j].className="";
			this.className="cur2";
		}
	links[openNum].className="cur2";
}

function show(dot){
	var li_=dot.parentNode.getElementsByTagName("li");
	for(i=0;i<li_.length;i++){
		li_[i].style.cssText="font-weight:normal;background:#f3f7f8;";
	}
	dot.style.cssText="font-weight:bold;background:#ECECFF;";
}

function openwindowtocenter( url, winName, width, height) 
{
	xposition=0; yposition=0;
	if ((parseInt(navigator.appVersion) >= 4 ))
	{
	  //xposition = (screen.width - width) / 2;
	  xposition = (window.screen.availWidth - width) / 2;
	  yposition = (window.screen.availHeight - height) / 2;
	}
	yposition = 0;
	  theproperty= "width=" + width + "," 
	+ "height=" + height + "," 
	+ "location=0," 
	+ "menubar=0,"
	+ "resizable=1,"
	+ "scrollbars=yes,"
	+ "status=0," 
	+ "titlebar=0,"
	+ "toolbar=0,"
	+ "hotkeys=0,"
	+ "screenx=" + xposition + "," 
	+ "screeny=" + yposition + "," 
	+ "left=" + xposition + "," 
	+ "top=" + yposition; 
	window.open( url,winName,theproperty );
}
function openMaxWindow(url, winName){
	window.open(url,winName,"scrollbars=yes,status=yes,resizable=no,top=0,left=0,width="+(screen.availWidth-10)+",height="+(screen.availHeight-50));
}


